package com.flitsneak.designpatterns.behavioralpatterns.chainofresponsibility;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/7/8 11:18
 * @description
 */
public class HonestBoyfriend extends Boyfriend{
    @Override
    public void featureOrder(String order) {
        if (order.equals("3")) {
            System.out.println("老实巴交的男友3号接盘！");
        } else {
            if (getNext() != null) {
                getNext().featureOrder(order);
            } else {
                System.out.println("再也没有后续男友了！");
            }
        }
    }
}
